<form method="post" action="/oss/?r=settingChannel/doEdit">
    <{include file='../common_params.tpl'}>
    <input type="hidden" name="id" value="<{$info.id}>" />

    <div class="box box-black">
        <div class="box-body">
            <table class="table table-bordered">
                <colgroup>
                    <col style="width: 20%;"></col>
                    <col style="width: 80%;"></col>
                </colgroup>
                
                <tr>
                    <th class="th-label">渠道名称</th>
                    <td>
                        <input type="text" name="channel_name" class="form-control inline" value="<{$info.channel_name}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">渠道ID</th>
                    <td>
                        <input type="text" name="tab" class="form-control inline" value="<{$info.tab}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">所属专服</th>
                    <td>
                    	<input type="hidden" name="old_special_id" value="<{$info.special_id}>" />
                        <select class="form-control inline" name="special_id">
                        	<{foreach from=$specialList item=item key=key}>
                        		<option value="<{$key}>" <{if $info.special_id == $key }>selected<{/if}> ><{$item}></option>
                        	<{/foreach}>
                        </select>
                    </td>
                </tr>
                
                

            </table>
        </div>

        <div class="box-footer">
            <a href="<{$backUrl}>" class="btn btn-default">返回</a>
            <button type="submit" name="sub" class="btn btn-default pull-right">保存</button>
            <input type="hidden" name="page" value="<{$page}>" />
        </div>
    </div>
</form>

<script type="text/javascript">
    $(function(){
    	$('button[name="sub"]').click(function(){
        	var channel_name = $('input[name="channel_name"]').val();
        	if(channel_name == ''){
        		layer.alert('请填写渠道名称', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var tab = $('input[name="tab"]').val();
        	if(tab == ''){
        		layer.alert('请填写渠道ID', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
            
        });
    });

</script>